package com.frontop.system.modules.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.frontop.system.modules.user.model.TUser;
import com.frontop.system.modules.user.model.TUserShowInfo;
import com.frontop.system.modules.user.vo.TUserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

/**
 * <p>
 * 用户表	 Mapper 接口
 * </p>
 *
 * @author YangJia
 * @since 2021-09-13
 */
@Mapper
public interface TUserMapper extends BaseMapper<TUser> {
    Page<TUserShowInfo> selectUserPage(Page<TUserShowInfo> page, @Param("param") TUserVO vo);

    /**
     * 用户查询个人信息
     * @param userName
     * @return
     */
    TUserShowInfo selectShowUserInfo(@Param("userName")String userName);

    int deleteUserByUserName(String userName);

    int updateUserHead(@Param("map")Map<String,Object> map);

    String selectPasswordByUserName(@Param("userName")String userName);

    int updatePasswordByUserName(@Param("userName")String userName,@Param("password")String password);
}
